# 请求头的封装
import requests


class HeaderUtil:
    # 获取ihrm的token
    @classmethod
    def get_token(cls):
        url = "http://ihrm-test.itheima.net/api/sys/login"
        header = {"Content-Type": "application/json"}
        body = {"mobile": "13800000002", "password": "123456"}
        resp = requests.post(url=url, headers=header, json=body)
        token = resp.json()["data"]
        return token



